﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

///<summary>
///
///</summary>
public class ShopState : State
{
    public override void ExecuteState(StateManager manager)
    {
        if (manager.IsSkipEndPanel)
        {
            ExitState(manager);
        }
    }

    public override void ExitState(StateManager manager)
    {
        if (manager.IsSkipEndPanel)
        {
            AppFacde.Instance.RemoveMediator("ShopMediator");
            StateManager.GetInstance.SetState(new EndState());
            Debug.Log("跳转end界面");
            SendNotification(GameEvents.RETURN_END);
        }
    }

    public override void InitState(StateManager manager)
    {
        manager.IsSkipShopPanel = false;
        manager.IsSkipEndPanel = false;
    }
}
